package com.molin.DateTest.jdk8DateTest;

import java.time.LocalDate;
import java.time.Period;

public class Demo7 {
    public static void main(String[] args) {
        LocalDate start=LocalDate.of(2020,10,11);
        LocalDate end=LocalDate.of(2048,12,18);
        Period period= Period.between(start,end);
        System.out.println(period);
        System.out.println(period.getYears());
        System.out.println(period.getMonths());
        System.out.println(period.getDays());
        System.out.println(period.toTotalMonths());

    }
}
